<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>User_view</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
</head>
<body>
<div  th:fragment="top">
    ...
</div>

view


<div th:include="common/top :: top"></div>
inclide=”文件路径::局部代码片段名称”
</body>
</html>